package DesignPattern.responsibility;

/**
 * @Author self
 * @Date 2025/7/10 20:20
 * @Describe
 */
// Handler 接口
public abstract class Handler {
    private Handler next;

    public void setNext(Handler next) {
        this.next = next;
    }

    public void handle(Request request) {
        if (next != null) {
            next.handle(request);
        }
    }
}